// RenderWindow.h

#pragma once
#ifndef RENDERWINDOW_H_INCLUDED
#define RENDERWINDOW_H_INCLUDED

#include "Bitmap.h"
#include "Net.h"

class RenderWindow
{
public:

	Bitmap* m_pxBM;

	HINSTANCE m_hInstance;
	WNDCLASS m_xWndClass;
	HWND m_hWnd;
	bool m_bQuit;
	int m_iW,m_iH;
	bool m_bActive;
	GDIFont m_xScoreFont;

	dword m_dwMyID;
	int m_iLastGameTick;

	Net m_xNet;
	World m_xWorld;

	RenderWindow();
	~RenderWindow();

	bool Init(HINSTANCE p_hInstance);
	void Shut();

	static long RenderWindow::StaticMainWndProc(HWND p_hWnd,int p_iMessage,int p_wWParam,int p_iLParam);

	bool MessagePump(bool p_bFull);
	long MainWndProc(int p_iMessage,int p_wWParam,int p_iLParam);

	virtual void OnResize(int p_iW,int p_iH);
	virtual void Render();

	void OnChar(char p_cKey);
};

#endif // RENDERWINDOW_H_INCLUDED
